<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCarBrandTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('car_brand', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name',50)->comment('品牌名称');
            $table->char('pinyin_first',1)->comment('首字母');
            $table->integer('sort')->default(0)->comment('排序');
            $table->timestamps();
            $table->softDeletes();
        });
        \DB::statement("ALTER TABLE `car_brand` comment '车辆品牌表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('car_brand');
    }
}
